package com.photoeditor.demo.util;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

/**
 * Created by dell on 2017/11/27.
 */

public class TimeChangedReceiver extends BroadcastReceiver {

    TimeChangeListener listener = null;

    @Override
    public void onReceive(Context context, Intent intent) {
        if (intent == null) {
            return;
        }

        if (listener != null) {
            listener.onTimeChange();
        }
    }

    public void setListener(TimeChangeListener changeListener) {
        listener = changeListener;
    }

    public interface TimeChangeListener {
        void onTimeChange();
    }
}
